<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>Title</title>
</head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" ></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" >
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<body>
<button type="button">提交</button>
<span id="text"></span>
</body>
<script type="text/javascript">
   const username = "root";
   const password = "123456";
   $("button").on("click", function () {
      $.ajax({
         url:"/login/" + username + "/" + password,
         type: "get",
         success: function f(a) {
            $('#text').html(a);
            console.log("请求成功");

         }
      })
   });
</script>
</html>
